package com.gsm.employee;

import com.gsm.common.utils.IdWorker;
import com.gsm.common.utils.JwtUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;


@SpringBootApplication(scanBasePackages = "com.gsm")
@EntityScan("com.gsm.domain.employee")
@EnableEurekaClient
public class EmployeeServer {

    public static void main(String[] args) {
        SpringApplication.run(EmployeeServer.class, args);
    }

    @Bean
    public IdWorker idWorkker() {
        return new IdWorker(1, 1);
    }

    @Bean
    public JwtUtils jwtUtil() {
        return new JwtUtils();
    }
}